package ws.jonas.sybosc.gui;

import java.awt.Dimension;
import java.net.URL;

import javax.swing.Box;
import javax.swing.ImageIcon;

public class GuiUtil {
	public static Box.Filler createFiller(int x, int y) {
		return new Box.Filler(new Dimension(x, y), new Dimension(x, y), new Dimension(x, y));
	}

	public static class Images {
		public static final ImageIcon ONLINE = getImage("../resources/connection-online.png");
		public static final ImageIcon OFFLINE = getImage("../resources/connection-offline.png");

		private static ImageIcon getImage(String path) {
			URL imageURL = GuiUtil.class.getResource(path);
			return imageURL == null ? null : new ImageIcon(imageURL);
		}
	}
}
